<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("devildark", $con);
$dateTime = date("Y-m-d",strtotime("-1 day"));

mysql_query("DELETE FROM devildark_query WHERE RegisterDate< '2012-03-28' or RegisterDate >'$dateTime'");
mysql_query("DELETE FROM devildark_query WHERE GDGet < 0 ");
mysql_query("DELETE FROM devildark_query WHERE DailyGDGetFromTC < 0 ");
mysql_query("DELETE FROM devildark_query WHERE DataTimes< '2012-03-20' or DataTimes >'$dateTime'");
mysql_close($con);
?>